package middleware

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func ErrPage() gin.HandlerFunc {
	return func(c *gin.Context) {

		c.Next()

		if c.Writer.Status() != 200 {
			c.JSON(http.StatusOK, gin.H{
				"code": 1024,
				"msg":  "页面丢失",
			})
		}
		c.Abort()
		return
	}
}
